all:	$(subst .cpp,.o,$(wildcard *.cpp)) $(subst .c,.o,$(wildcard *.c))

# FLAGS+=-fopenmp
# FLAGS+=-std=c++11

GCC=mpicc
GPP=mpic++

%.o: %.cpp
	$(GPP) $< -o $@ $(FLAGS)
%.o: %.c
	$(GCC) $< -o $@ $(FLAGS)

clean: $(wildcard *.cpp)
	rm $(subst .cpp,.o,$?)
